﻿using System;

namespace TemplateFoundation.PageTypeIcons {

    /// <summary>
    /// <para>Attribute used to define the icon used with a <see cref="PageTypeBuilder.TypedPageData"/>.</para>
    /// </summary>
    [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)]
    public abstract class IconAttribute : Attribute {

        /// <summary>
        /// <para>Initializes a new PageTreeIconAttribute</para>
        /// </summary>
        /// <param name="imageUrl">The virtual path to the icon to use.</param>
        public IconAttribute(string imageUrl) {
            this.ImageUrl = imageUrl;
        }

        /// <summary>
        /// <para>The virtual path to the icon to use.</para>
        /// </summary>
        public string ImageUrl {
            get;
            private set;
        }
    }
}